/**
 * Copyright &copy; 2012-2017 <a href="https://vivo.com">vivo</a> All rights reserved.
 */
package com.vivo.dealer.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.thinkgem.jeesite.common.persistence.Page;
import com.thinkgem.jeesite.common.service.CrudService;
import com.vivo.dealer.entity.ViDeaWarehousesnquery;
import com.vivo.dealer.dao.ViDeaWarehousesnqueryDao;

/**
 * 串号查询Service
 * @author jyangye
 * @version 2018-01-24
 */
@Service
@Transactional(readOnly = true)
public class ViDeaWarehousesnqueryService extends CrudService<ViDeaWarehousesnqueryDao, ViDeaWarehousesnquery> {

    @Autowired
    private ViDeaWarehousesnqueryDao viDeaWarehousesnqueryDao;

	public ViDeaWarehousesnquery get(String id) {
		return super.get(id);
	}

	public ViDeaWarehousesnquery get(ViDeaWarehousesnquery viDeaWarehousesnquery) {
		return super.get(viDeaWarehousesnquery);
	}

	public ViDeaWarehousesnquery getLastChangeItem(ViDeaWarehousesnquery viDeaWarehousesnquery) {
	    return viDeaWarehousesnqueryDao.getLastChangeItem(viDeaWarehousesnquery);
    }
	
	public List<ViDeaWarehousesnquery> findList(ViDeaWarehousesnquery viDeaWarehousesnquery) {
		return super.findList(viDeaWarehousesnquery);
	}
	
	public Page<ViDeaWarehousesnquery> findPage(Page<ViDeaWarehousesnquery> page, ViDeaWarehousesnquery viDeaWarehousesnquery) {
		return super.findPage(page, viDeaWarehousesnquery);
	}


	
	@Transactional(readOnly = false)
    public void insertByBatch(List<ViDeaWarehousesnquery> viDeaWarehousesnqueries, String area) {
	    if (area.equals("ah")) {
            viDeaWarehousesnqueryDao.insertByBatchAh(viDeaWarehousesnqueries);
        } else {
            viDeaWarehousesnqueryDao.insertByBatchJs(viDeaWarehousesnqueries);
        }
    }


	@Transactional(readOnly = false)
	public void save(ViDeaWarehousesnquery viDeaWarehousesnquery) {
		super.save(viDeaWarehousesnquery);
	}
	
	@Transactional(readOnly = false)
	public void delete(ViDeaWarehousesnquery viDeaWarehousesnquery) {
		super.delete(viDeaWarehousesnquery);
	}
	
}